#!/bin/bash

# cat > config.yaml << EOF
# gitee_token: ${GiteeToken}    # GiteeUserPassword
# requires_repo: ${buddy}  # buddy
# build_env_account: ${PkgShipUserName} # PkgShipUserName
# build_env_passwd: ${PkgShipPassword}  # PkgShipPassword
# warehouse_owner: ${repo_owner} # repo_owner
# build_host: ${obs_rpm_host} # obs_rpm_host
# files_server: ${repo_server} # repo_server

# EOF


sed -i "/^gitee_token: */cgitee_token: ${GiteeToken}" config.yaml
sed -i "/^requires_repo: */crequires_repo: ${buddy}" config.yaml
sed -i "/^build_env_account: */cbuild_env_account: ${PkgShipUserName}" config.yaml
sed -i "/^build_env_passwd: */cbuild_env_passwd: ${PkgShipPassword}" config.yaml
sed -i "/^warehouse_owner: */cwarehouse_owner: ${repo_owner}" config.yaml
sed -i "/^build_host: */cbuild_host: ${obs_rpm_host}" config.yaml
sed -i "/^files_server: */cfiles_server: ${repo_server}" config.yaml